package com.es.service.impl;

import com.es.dao.StudentDaoI;
import com.es.dao.impl.StudentDaoImpl;
import com.es.model.Student;
import com.es.service.StudentServiceI;

import java.util.List;

public class StudentServiceImpl implements StudentServiceI {

    StudentDaoI dao = new StudentDaoImpl();

    @Override
    public int save(Student student) {
        return dao.save(student);
    }

    @Override
    public int update(Student student) {
        return dao.update(student);
    }

    @Override
    public int delete(Integer id) {
        return dao.delete(id);
    }

    @Override
    public List<Student> list() {
        return dao.list();
    }

    @Override
    public Student get(Integer id) {
        return dao.get(id);
    }

    @Override
    public List<Student> listByName(String name) {
        return dao.listByName(name);
    }

    @Override
    public Student get(String phone) {
        return dao.get(phone);
    }
}
